//
//  PersonCell.m
//  XDBaseFrameWork
//
//  Created by XD-XY on 10/1/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import "PersonCell.h"

@implementation PersonCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self makeViews];
    }
    return self;
}

-(void)makeViews
{
    self.iconIV = [UIImageView initImageViewRect:CGRectMake(10,10.5, 24,24) andImage:nil andUserInteractionEnabled:YES];
    self.titleLB = [UILabel initLabelText:@"" andRect:CGRectMake(width_x(_iconIV)+8, 2, 100, 41) andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:15.5] andTextColor:UIColorFromRGB(0x6f6254) andTextAlignment:NSTextAlignmentLeft];
    
    self.arrowIV = [UIImageView initImageViewRect:CGRectMake(UI_SCREEN_WIDTH-17-7,34/2.0f, 7, 11) andImage:LOADIMAGE(@"arrow_cell@2x") andUserInteractionEnabled:YES];
    
    self.rightLB = [UILabel initLabelText:@"" andRect:CGRectMake(0,3, UI_SCREEN_WIDTH-17, 42)andBackGroudColor:mClearColor andTextFont:[UIFont systemFontOfSize:14.5] andTextColor:UIColorFromRGB(0x999999) andTextAlignment:NSTextAlignmentRight];
    _rightLB.hidden = YES;
    
    
    self.hasNewIV = [UIImageView initImageViewRect:CGRectMake(self.arrowIV.frame.origin.x-15, self.arrowIV.frame.origin.y+1, 8, 8) andImage:nil andUserInteractionEnabled:YES];
    _hasNewIV.layer.masksToBounds = YES;
    _hasNewIV.layer.cornerRadius = 4;
    
    [self.contentView addSubview:_iconIV];
    [self.contentView addSubview:_titleLB];
    [self.contentView addSubview:_arrowIV];
    [self.contentView addSubview:_rightLB];
    [self.contentView addSubview:_hasNewIV];

    
    self.upline = [UIView initViewRect:CGRectMake(0, 0, UI_SCREEN_WIDTH, 0.5) andBackGroudColor:UIColorFromRGB(0xd6d6d6)];
    
    self.downline = [UIView initViewRect:CGRectMake(43,44.5, UI_SCREEN_WIDTH-43, 0.5) andBackGroudColor:UIColorFromRGB(0xd6d6d6)];
    
    [self.contentView addSubview:_upline];
    [self.contentView addSubview:_downline];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
